import React from 'react'
import Info from './project/info'
import Key from './project/key'
import Channel from './project/channel'
class editproject extends React.Component{
    constructor(props) {
        super(props);
        this.state = {showFlg: 0x01};
    }
    showBody(){
        const flg = this.state.showFlg;
        if(flg === 0x01){
            return <Info/>;
        }else if(flg === 0x02){
            return <Key/>
        }else if(flg === 0x03){
            return <Channel/>
        }
    }
    render(){
        return (
            <div>
                <div className="page-header">
                    <h1>项目管理</h1>
                </div>
                <ul className="nav nav-tabs">
                    <li role="presentation"
                        className={this.state.showFlg===0x01?"active":""}
                        onClick={() => {this.setState({showFlg:0x01})}}>
                        <a style={{cursor:'pointer'}}>基本信息</a>
                    </li>
                    <li role="presentation"
                        className={this.state.showFlg===0x02?"active":""}
                        onClick={() => {this.setState({showFlg:0x02})}}>
                        <a style={{cursor:'pointer'}}>签名配置</a>
                    </li>
                    <li role="presentation"
                        className={this.state.showFlg===0x03?"active":""}
                        onClick={() => {this.setState({showFlg:0x03})}}>
                        <a style={{cursor:'pointer'}}>多渠道配置</a>
                    </li>
                </ul>
                <div className="panel panel-default tab-and-panel">
                    <div className="panel-body pbodytable">
                        {this.showBody()}
                    </div>
                </div>
            </div>
        );
    }
}
export default editproject;